package learn_effective_java.item_03;

public class Elvis1 {
	public static final Elvis1 INSTANCE;
	private static boolean exist = false;
	
	static {
		INSTANCE = new Elvis1();
		exist = true;
	}
	
	private Elvis1() {
		if(exist)
			throw new IllegalStateException("Instance already exists");
	}
	
	public void leaveTheBuilding() {
		System.out.println(this.hashCode() + " -- Do something...");
	}
	
}
